package com.runvp.service.auth.domain;

import lombok.Getter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@ToString
@Getter
@Table(name = "biz_login_log")
public class BizLoginLog {
    /**
     * 访问ID
     */
    @Id
    @Column(name = "info_id")
    private Long infoId;

    /**
     * 用户账号
     */
    @Column(name = "user_name")
    private String userName;

    /**
     * 登录IP地址
     */
    private String ipaddr;

    /**
     * 登录状态（0 Success 1 Error）
     */
    private String status;

    /**
     * 提示信息
     */
    private String msg;

    /**
     * 访问时间
     */
    @Column(name = "access_time")
    private Date accessTime;

    public BizLoginLog setInfoId(Long infoId) {
        this.infoId = infoId;
        return this;
    }

    public BizLoginLog setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    public BizLoginLog setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr;
        return this;
    }

    public BizLoginLog setStatus(String status) {
        this.status = status;
        return this;
    }

    public BizLoginLog setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public BizLoginLog setAccessTime(Date accessTime) {
        this.accessTime = accessTime;
        return this;
    }
}